Release 2.3 Copyright ã1994 by Michael B. Johnson and the MIT Media Lab  All Rights Reserved.

WavesWorld File Formats

There are a fair number of different file formats I use in WavesWorld.  All of the icons in this file are supplied by the WorkspaceManager if you have installed the app WW3DTester.app in ../Source/WWTester.  Just compile and drag it into your ~/Apps directory, or /LocalApps.  You might need to select the directory and do a cmd-u (updateViewers) to get the Workspace Manager to use the icons...

This document should serve as  a useful starting point in understanding them.  But, hey, you've got all the source code...  Also, there are examples of valid versions of all these files in the Examples directories.

One important note for non-Emacs users.  I use Emacs as my default editor, and Emacs likes to write backup files.  These backup files have names of the form foo~, where the original file's name is foo.  Other editors also use this convention.  Since most of the files below are either plain text files or file packages, I find myself editing the plain text files and subsequently have lots of backup files scattered around when I work.  I chose to use a different icon for the backup files.  I tend to use long filenames, and its really frustrating to see  two files called "boyThisIsALongNa..." in the workspace, when I know that one is the real file and the other is a backup. Having a separate icon (which looks like a faded, dog-eared, Diet Pepsi-stained, cat-gnawed version of the original) helps me a lot.  Also, since I don't edit file packages en-masse, I don't generate backup files of my file packages, so I don't have a corresponding icon for that.

This is different than InterfaceBuilder, which does edit file packages, and which uses the same icon for its current version (foo.nib) and its backup (foo.nib~),  Why IB uses the same icon, I have no idea - it's really, really, annoying...

Anyway, without further ado, the file formats of WavesWorld:

¬*.tcl
 ¬*.tcl~
A tcl file contains tcl (the "tool command language") code.  WavesWorld uses, and depends on, tcl of version 7.0 or later.  The major difference between pre-7.0 tcl code (for WavesWorld purposes) is the fact that you can do much more math (sin, cos, etc.) inside expr as of version 7.0.  Depending on when you're reading this, the best way to learn about tcl is to either ftp to sprite.berkeley.edu and grab parts 1 and 3 of the tcl book there.  These are compressed PostScript files containing an  preprint version of John Ousterhout's book on tcl and the Tk toolkit (an X windows toolkit which uses tcl).  If you're reading this after late spring 1994, you can probably go to your local bookstore and pick up the real thing.  The final book is better than the preprint (lots of things explained better, that was the point of making the pre-print available on the net for free...), and is highly reccommended.

With regard to the WavesWorld palettes, tcl files are usually part of a file package (see .mdl, .scn below) that is dropped into a WW3DWell.

 ¬*.eve
¬ *.eve~
An eve file is a file which contains "eve" code.  Eve is an extended version of tcl used in WavesWorld.  The major extension that eve provides over standard tcl is a full RenderMan binding.  There are a few other commands, (applyToCTM, EveCmd, etc.), but that's the main difference. 
With regard to the WavesWorld palettes, eve files are usually dropped directly into a WWRIBWell, or they are part of a file package (see .wwModel below) that is dropped into a WW3DWell.

¬*.rib
¬ *.rib~
A rib file is one which contains a RenderMan Interface Bytestream file.
With regard to the WavesWorld palettes, rib files are usually dropped directly into a WW3DWell, or they are part of a file package (see .mdl, .scn below) that is dropped into a WW3DWell.

 ¬ *.cam
¬ *.cam~
A cam file is a file which contains  tcl code that talks directly to the camera in a given scene.  With regard to the WavesWorld palettes, cam files are usually dropped directly into a WW3DWell, or they are part of a file package (see .mdl, .scn below) that is dropped into a WW3DWell.

¬*.mdl, *.wwModel
An mdl file is actually a file package containing eve code, tcl code, and nib files.  The only requirement for an .mdl file is that it contain a file of eve code called model.eve.  That file should build a shape hierarchy, i.e. it should not just be a bunch of procedure definitions or just load in nibs, it should actually execute at least one startShape/endShape pair or an AttributeBegin/AttributeEnd pair.

¬*.mdlTemplate, *.wwModelTemplate
An mdlTemplate file is actually a file package containing eve code and (potentially) cam code, tcl code, and nib files.  The only requirement for an .mdl file is that it contain a file of eve code called model.eve.  That file should not build a shape hierarchy, i.e. it should just be a bunch of procedure definitions or just load in nibs.